package com.demo.param;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

@Getter
@Setter
@ToString
public class OriginParam {

    private Integer originId;

    @NotBlank(message = "商品名称不可以为空")
    @Length(min = 1, max = 20, message = "商品名称长度需要在20个字以内")
    private String shopName;

    @NotBlank(message = "商品编码不可以为空")
    @Length(min = 1, max = 50, message = "商品编码需要在50个字母以内")
    private String shopNumber;

    private Double shopPrice;

    private Integer quantity;

    private Double amount;

    @Length(min = 0, max = 50, message = "商品条码长度需要在50个字母以内")
    private String shopBar;

    @Length(min = 0, max = 50, message = "商品单位长度需要在25个字以内")
    private String shopCompany = "";

    private String loginIp;
}
